#!/bin/bash

ROOT_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd);

apt -y install geany
sudo cp $ROOT_PATH/geany/filetypes.AutoIt3.conf /usr/share/geany/filedefs/filetypes.AutoIt3.conf

#if ! grep -q -F 'AutoIt3=*.au3;' /usr/share/geany/filetype_extensions.conf
#then
sudo cp -n /usr/share/geany/filetype_extensions.conf /usr/share/geany/filetype_extensions.conf.0
sudo cp -f /usr/share/geany/filetype_extensions.conf.0 /usr/share/geany/filetype_extensions.conf
sudo sed -i -e '
s/\[Extensions\]/\[Extensions\]\nAutoIt3=*.au3;/
' /usr/share/geany/filetype_extensions.conf
#fi
